home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / AMOSList-0497 / AMOSLIST / text0045.txt < prev    next >
Encoding:
Text File  |  1998-06-24  |  5.8 KB  |  181 lines

  1. I am writing to the list about the Optimisation Tips written by Ben Wyatt.
  2.  
  3. This very good file explains different ways to improve speed in your
  4. AMOS-programs.
  5.  
  6. However some of the tips really surprised me. Ben states that A=A+1 should be
  7. faster than both Inc A and Add A,1. He also writes that Repeat ... Inc ...
  8. Until should be faster than For ... Next. I have been doing some tests on my
  9. system and it clearly proves that this is WRONG!
  10.  
  11. I can not believe that Ben Wyatt has not checked his tips, so I must conclude
  12. that the difference in speed is different on different system (I do not think
  13. that Ben has a 68060?).
  14.  
  15. Anyway I am working on a small program that will test the speed of different
  16. commands, and I am thinking that it should be run on different systems, so we
  17. could clear out which commands is fastest on which system. The rest of the
  18. message is an output of my not-yet-finished speed tester.
  19.  
  20. Do anyone has some comments on this?
  21.  
  22. --------------------------------------------------------------------------------
  23.  
  24.                   AMOS Speed Test v1.0 performed Tue 08-Apr-97
  25.  
  26. --------------------------------------------------------------------------------
  27.  
  28. CPU                                                                       
  29. 68060
  30.  
  31. FPU                                                                    
  32. Built-in
  33.  
  34. Fast Free                                                              
  35. 37242408
  36.  
  37. Chip Free                                                               
  38. 1821344
  39.  
  40. Program State                                                          
  41. Compiled
  42.  
  43. --------------------------------------------------------------------------------
  44.  
  45. Command                                 Origin              Repeats      
  46. Blanks
  47.  
  48. --------------------------------------------------------------------------------
  49.  
  50.                                       Plot
  51.  
  52. --------------------------------------------------------------------------------
  53.  
  54. Plot                                    -                   100000          
  55. 123
  56.  
  57. Ink : Plot                              -                   100000          
  58. 142
  59.  
  60. F Plot                                  Turbo               100000           
  61. 40
  62.  
  63. Turbo Plot                              AMCAF               100000           
  64. 40
  65.  
  66. --------------------------------------------------------------------------------
  67.  
  68.                                       Draw
  69.  
  70. --------------------------------------------------------------------------------
  71.  
  72. Draw                                    -                   2000            
  73. 198
  74.  
  75. Turbo Draw                              AMCAF               2000            
  76. 195
  77.  
  78. --------------------------------------------------------------------------------
  79.  
  80.                                      Circle
  81.  
  82. --------------------------------------------------------------------------------
  83.  
  84. Circle : Paint                          -                   100             
  85. 514
  86.  
  87. F Circle                                AMCAF               100              
  88. 10
  89.  
  90. --------------------------------------------------------------------------------
  91.  
  92.                                       Point
  93.  
  94. --------------------------------------------------------------------------------
  95.  
  96. Point                                   -                   100000           
  97. 78
  98.  
  99. F Point                                 AMCAF               100000           
  100. 39
  101.  
  102. --------------------------------------------------------------------------------
  103.  
  104.                                 Increase Variable
  105.  
  106. --------------------------------------------------------------------------------
  107.  
  108. Inc X                                   -                   500000           
  109. 64
  110.  
  111. Add X,1                                 -                   500000           
  112. 68
  113.  
  114. X=X+1                                   -                   500000           
  115. 73
  116.  
  117. --------------------------------------------------------------------------------
  118.  
  119.                           Increase Dimensioned Variable
  120.  
  121. --------------------------------------------------------------------------------
  122.  
  123. Inc X()                                 -                   500000           
  124. 93
  125.  
  126. Add X(),1                               -                   500000           
  127. 99
  128.  
  129. X()=X()+1                               -                   500000          
  130. 120
  131.  
  132. --------------------------------------------------------------------------------
  133.  
  134.                              Heavy Increase Variable
  135.  
  136. --------------------------------------------------------------------------------
  137.  
  138. Add X,1000                              -                   500000           
  139. 89
  140.  
  141. X=X+1000                                -                   500000           
  142. 93
  143.  
  144. --------------------------------------------------------------------------------
  145.  
  146.                        Heavy Increase Dimensioned Variable
  147.  
  148. --------------------------------------------------------------------------------
  149.  
  150. Add X(),1000                            -                   500000          
  151. 114
  152.  
  153. X()=X()+1000                            -                   500000          
  154. 136
  155.  
  156. --------------------------------------------------------------------------------
  157.  
  158.                                  Countable Loops
  159.  
  160. --------------------------------------------------------------------------------
  161.  
  162. For : Next                              -                   5000000         
  163. 173
  164.  
  165. Repeat : Inc : Until                    -                   5000000         
  166. 322
  167.  
  168. While : Inc : Wend                      -                   5000000         
  169. 322
  170.  
  171. Do : Inc : Exit : Loop                  -                   5000000         
  172. 332
  173.  
  174. --------------------------------------------------------------------------------
  175.  
  176. -- 
  177. rune j. keller - sporuplundsvej 105 - dk-8472 sporup - keller@vip.cybercity.dk
  178. -my mommy always said there were no monsters... no real ones... but there are!
  179.  
  180.  
  181.